using System.Web.Mvc;
using System.Web.Routing;
using Nop.Web.Framework.Mvc.Routes;
using Nop.Plugin.DiscountRules.Customers.ViewEngines;

namespace Nop.Plugin.DiscountRules.Customers
{
	public class RouteProvider : IRouteProvider
	{
		public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
		{
			//System.Web.Mvc.ViewEngines.Engines.Add(new SpotsHubDiscountCustomerViewEngine());
			routes.MapRoute("Plugin.DiscountRules.Customers.Configure",
				"Plugins/DiscountRulesCustomers/Configure",
				new { controller = "DiscountRulesCustomers", action = "Configure" },
				new[] { "Nop.Plugin.DiscountRules.Customers.Controllers" }
		   );

			routes.MapRoute("Plugin.DiscountRules.Customers.RemoveCustomers",
				"Plugins/DiscountRulesCustomers/RemoveCustomers",
				new { controller = "DiscountRulesCustomers", action = "RemoveCustomers" },
				new[] { "Nop.Plugin.DiscountRules.Customers.Controllers" }
		   );

			routes.MapRoute("Plugin.DiscountRules.Customers.GetCustomers",
				"Plugins/DiscountRulesCustomers/GetCustomers",
				new { controller = "DiscountRulesCustomers", action = "GetCustomers" },
				new[] { "Nop.Plugin.DiscountRules.Customers.Controllers" }
		   );
		}

		public int Priority
		{
			get
			{
				return 0;
			}
		}
	}
}
